<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\ApiProjectCollection;
use App\Http\Resources\ApiResource;
use App\Model\Repository\ApiProjectRepository;
use Illuminate\Http\Request;

class ApiProjectController extends Controller
{
    /**
     * @return ApiProjectCollection
     */
    public function index()
    {
        return new ApiProjectCollection(ApiProjectRepository::all());
    }

    /**
     * @param $id
     * @return ApiResource
     */
    public function show($id)
    {
        return new ApiResource(ApiProjectRepository::find($id));
    }

}
